from selenium.webdriver.common.by import By


class  UserGroupLocator:

    # usergroup菜单
    user_group_tab = (By.XPATH, "//li[contains(@data-menu-id,'USER_CST_GROUP_LANDINGPAGE')]/span/div")


    #add_user_group
    add_user_group=(By.XPATH,"//div[contains(@class,'leftTitle')]/button")

    #user_group_name
    user_group_name=(By.CSS_SELECTOR,'[placeholder="Enter name"]')

    #user_select
    user_select=(By.CSS_SELECTOR,'[class="antd4-select-selection-overflow"]')

    #CHOOICe  USER
    chooice_user=(By.CSS_SELECTOR,'[class="antd4-select-tree-checkbox-inner"]')

    #add_user_group_ok
    add_user_group_ok=(By.XPATH,'//div[@class="antd4-modal-footer"]/button[2]')

    #user_group_search_input
    user_group_search_input=(By.XPATH,'(//input[@id="userGroupName"])[1]')

    #user_group_查询按钮
    user_group_search_button=(By.XPATH,"(//button[contains(@class,'input-search-button')])[1]")

    #获取usergroup的值
    user_group_text=(By.XPATH,"//li[contains(@class,'list-item active')]//span")

    # action下拉列表
    action_list = (By.XPATH, "//button[contains(@class,'dropdown-trigger')]")
    #action_list = (By.XPATH, "//button[contains(@class,'dropdown-trigger')]")

    # delete删除
    action_delete = (By.XPATH, "//li[contains(@data-menu-id,'del')]")

    #删除确认
    delete_acknowledge=(By.CSS_SELECTOR,'[class="antd4-checkbox"]')

    #提交删除
    delete_confirm=(By.XPATH,"//div[contains(@class,'modal-footer')]/button[2]")

    #add_user_button
    add_user_button=(By.XPATH,"//button[contains(@class,'btn-primary')]")

    # edit编辑
    action_edit = (By.XPATH, "//li[contains(@data-menu-id,'edit')]")

    #user_group_edit_name
    user_group_edit_name=(By.XPATH, "//input[contains(@class,'input-status-success')]")

    # user_group_edit_name
    user_group_name_edit=(By.XPATH, "//input[contains(@class,'input-status-error')]")

    #remove_user
    # remove_user=(By.XPATH,"//button[contains(@class,'link nopadding')]")
    remove_user = (By.XPATH, '//*[text()="Remove User"]/..')

    #ADD_USER
    add_user=(By.XPATH,"(//button[contains(@class,'antd4-btn-primary')])")

    #user_chooice
    user_select_input=(By.CSS_SELECTOR,'[id="userCodes"]')

    #user_click
    user_click=(By.CSS_SELECTOR,'[class="antd4-select-tree-checkbox-inner"]')

    #user_group_title
    user_group_title=(By.XPATH,"//div[contains(@class,'leftTitle')]/div")

    #reload_button
    reload_button=(By.CSS_SELECTOR,'[aria-label="reload"]')
